class Phone {
	constructor(price, barnd) {
		this.price = price;
		this.brand = barnd;
	}

	call() {
		console.log("我执行了")
		return `${this.brand} 价格${this.price}`
	}

	static size = 5.5;
}

const HuaWei = new Phone(1999, "Mate")
console.log(HuaWei.call())
console.log(Phone.size);


class SmartPhone extends Phone {
	constructor(price, brand, color) {
		super(price, brand);
		this.color = color;
	}

	call() {
		return `${this.brand} 价格${this.price},颜色为${this.color}`
	}
	playGame(){
		return `${this.brand}可以打游戏`
	}

	get price(){
		return "1299";
	}
	set price(val){
		console.log(val)
	}
}

const Mi = new SmartPhone(2999, "小米CC", "红色");
console.log(Mi.call());
console.log(Mi.playGame());
